package com.dailyblue.project.estate.test;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.model.ChatResponse;
import org.springframework.boot.test.context.SpringBootTest;
import reactor.core.publisher.Flux;

/**
 * @Auther:Liu
 * @Testname:App
 * @Date:2025/9/22 11:30
 */
@SpringBootTest
@Slf4j
public class App {
    @Resource
    private ChatClient ollamaChatClient;

    @Test
    public void a() {
        ChatResponse anwser = ollamaChatClient.prompt().user("9加上4等于多少").call().chatResponse();
        log.info("anwser:{}", anwser);
    }

    @Test
    public void b() {
        String content = ollamaChatClient.prompt().user("9加上4等于多少").call().content();
        log.info("content:{}", content);
    }
}
